package com.example.ex00_test;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {

	private TextView textView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		textView = (TextView) findViewById(R.id.textView1);
	}

	public void btnSend(View v) {
		new Thread() {
			@Override
			public void run() {
				TCPClient client = new TCPClient("192.168.199.218", 5000);
				String aesKey = "KwiDj5nD2eu1Ye9G8b7dQdgRy1gDh21P";
				MyJson myJson = new MyJson("EncryptionTest", "decrypt", "AES",
						"aaaaaaa");
				String start = "<#";
				String msg = myJson.toString();
				String end = "#>";
				// AESUtils.encrypt(aesKey, msg);
				client.send(start);
				client.send(msg);
				client.send(end);
			}
		}.start();
	}
}
